#include "PrecompiledHeader.h"
#include "ICtrlBasicGfx.h"

/*--------------------------------------------------------------------------*/

ICtrlBasicGfx::ICtrlBasicGfx()
{
	this->m_background = Color(0.0f, 0.0f, 0.0f, 0.0f);
	this->m_hoverBackground = Color(0.0f, 0.0f, 0.0f, 0.0f);
	this->m_border = Color(0.0f, 0.0f, 0.0f, 0.0f);
}

/*--------------------------------------------------------------------------*/

ICtrlBasicGfx::~ICtrlBasicGfx()
{

}

/*--------------------------------------------------------------------------*/

void ICtrlBasicGfx::ReadBasicGfx(std::ifstream& file, const std::string& firstWord)
{
	if (firstWord == "background")
	{
		uint r, g, b, a;
		file >> r >> g >> b >> a;

		this->m_background = Color(r, g, b, a);
	}

	if (firstWord == "hoverbackground")
	{
		uint r, g, b, a;
		file >> r >> g >> b >> a;

		this->m_hoverBackground = Color(r, g, b, a);
	}
	else if (firstWord == "border")
	{
		uchar r, g, b, a;
		file >> r >> g >> b >> a;

		this->m_border = Color(r, g, b, a);
	}
}

/*--------------------------------------------------------------------------*/